package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

public class IsrDemo {
    public static void main(String[] args) {
        try {
            FileInputStream fis = new FileInputStream("osw.txt");
            InputStreamReader isr = new InputStreamReader(fis, StandardCharsets.UTF_8);
            int d;
            while ((d = isr.read()) != -1) {
                System.out.println((char)d);
            }
            isr.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
